/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package vue;

import DAO.ConnexionBDOracle;
import DAO.DAOCanneOracle;
import donnees.ModeleTableSalle1;
import donnees.ModeleTableSalle2;
import donnees.ModeleTableSalle3;
import donnees.ModeleTableSalle4;
import donnees.ModeleTableSalle5;
import java.awt.Color;
import java.awt.Frame;
import java.sql.Connection;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JFrame;
import javax.swing.JOptionPane;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;
import metier.Acteur;
import metier.Autres;
import metier.Journaliste;
import metier.ParrainOfficiel;
import metier.Realisateur;
import metier.VIP;

/**
 *
 * @author p1104123
 */
public class Connexion extends javax.swing.JFrame {

    private Connection conn;
    private DAOCanneOracle daoCanne;
    private int droit;
    private List<VIP> donneesVIP = new ArrayList<>();
    private int key = 0;

    public Connexion() {
        try {
            UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
        } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException e) {
            System.out.println(e.getMessage());
        }

        conn = ConnexionBDOracle.getConnection();
        daoCanne = new DAOCanneOracle(conn);
        initComponents();
    }

    public void dialogModeDroitLecture() {
        boutonGestionPlanning.setEnabled(false);
    }

    public void initDonneesVIP() {
        try {
            daoCanne.getListVip(donneesVIP);
        } catch (SQLException ex) {
            Logger.getLogger(Connexion.class.getName()).log(Level.SEVERE, null, ex);
        }
    }

    public void gestionVIPModeAffichage() {
        numVIP.setEnabled(false);
        prenom.setEnabled(false);
        nom.setEnabled(false);
        nationalite.setEnabled(false);
        coef.setEnabled(false);
        compagnon.setEnabled(false);
        accreditation.setEnabled(false);
        realisateur.setEnabled(false);
        acteur.setEnabled(false);
        journaliste.setEnabled(false);
        parrain.setEnabled(false);
        autre.setEnabled(false);
        employeur.setEnabled(false);
        employeur.setText("");
        metier.setText("");
        metier.setEnabled(false);
        if (droit == 1) {
            boutonAjouter.setEnabled(true);
            boutonModifier.setEnabled(true);
            boutonSupprimer.setEnabled(true);
        }
        if (droit == 2) {
            boutonAjouter.setEnabled(false);
            boutonModifier.setEnabled(false);
            boutonSupprimer.setEnabled(false);
        }
        debut.setEnabled(true);
        precedent.setEnabled(true);
        suivant.setEnabled(true);
        fin.setEnabled(true);
        if (donneesVIP.size() != 0) {

            if (donneesVIP.get(key) instanceof Acteur) {
                Acteur tmp = (Acteur) donneesVIP.get(key);
                acteur.setSelected(true);
                numVIP.setText(String.valueOf(tmp.getNumVIP()));
                prenom.setText(tmp.getPrenom());
                nom.setText(tmp.getNom());
                nationalite.setText(tmp.getNationalite());
                coef.setSelectedIndex(tmp.getCoefAttrait() - 1);
                compagnon.setText(tmp.getCompagnon());
                accreditation.setSelectedIndex(tmp.getAccreditation() - 1);
            }
            if (donneesVIP.get(key) instanceof Autres) {
                Autres tmp = (Autres) donneesVIP.get(key);
                autre.setSelected(true);
                metier.setText(tmp.getMetier());
                numVIP.setText(String.valueOf(tmp.getNumVIP()));
                prenom.setText(tmp.getPrenom());
                nom.setText(tmp.getNom());
                nationalite.setText(tmp.getNationalite());
                coef.setSelectedIndex(tmp.getCoefAttrait() - 1);
                compagnon.setText(tmp.getCompagnon());
                accreditation.setSelectedIndex(tmp.getAccreditation() - 1);
            }
            if (donneesVIP.get(key) instanceof Journaliste) {
                Journaliste tmp = (Journaliste) donneesVIP.get(key);
                journaliste.setSelected(true);
                employeur.setText(tmp.getEmployeur());
                numVIP.setText(String.valueOf(tmp.getNumVIP()));
                prenom.setText(tmp.getPrenom());
                nom.setText(tmp.getNom());
                nationalite.setText(tmp.getNationalite());
                coef.setSelectedIndex(tmp.getCoefAttrait() - 1);
                compagnon.setText(tmp.getCompagnon());
                accreditation.setSelectedIndex(tmp.getAccreditation() - 1);
            }
            if (donneesVIP.get(key) instanceof ParrainOfficiel) {
                ParrainOfficiel tmp = (ParrainOfficiel) donneesVIP.get(key);
                parrain.setSelected(true);
                numVIP.setText(String.valueOf(tmp.getNumVIP()));
                prenom.setText(tmp.getPrenom());
                nom.setText(tmp.getNom());
                nationalite.setText(tmp.getNationalite());
                coef.setSelectedIndex(tmp.getCoefAttrait() - 1);
                compagnon.setText(tmp.getCompagnon());
                accreditation.setSelectedIndex(tmp.getAccreditation() - 1);
            }
            if (donneesVIP.get(key) instanceof Realisateur) {
                Realisateur tmp = (Realisateur) donneesVIP.get(key);
                realisateur.setSelected(true);
                numVIP.setText(String.valueOf(tmp.getNumVIP()));
                prenom.setText(tmp.getPrenom());
                nom.setText(tmp.getNom());
                nationalite.setText(tmp.getNationalite());
                coef.setSelectedIndex(tmp.getCoefAttrait() - 1);
                compagnon.setText(tmp.getCompagnon());
                accreditation.setSelectedIndex(tmp.getAccreditation() - 1);
            }

        }



    }

    public void gestionVIPModeAjouter() {
        effacertextVIP();
        numVIP.setText(String.valueOf(VIP.getDerniernum()));
        metier.setEnabled(false);
        employeur.setEnabled(false);
        numVIP.setEnabled(false);
        prenom.setEnabled(true);
        nom.setEnabled(true);
        nationalite.setEnabled(true);
        coef.setEnabled(true);
        compagnon.setEnabled(true);
        accreditation.setEnabled(true);
        realisateur.setEnabled(true);
        acteur.setEnabled(true);
        journaliste.setEnabled(true);
        parrain.setEnabled(true);
        autre.setEnabled(true);
        boutonModifier.setEnabled(false);
        boutonSupprimer.setEnabled(false);
        debut.setEnabled(false);
        precedent.setEnabled(false);
        suivant.setEnabled(false);
        fin.setEnabled(false);
    }

    public void effacertextVIP() {
        numVIP.setText("");
        prenom.setText("");
        nom.setText("");
        nationalite.setText("");
        coef.setSelectedIndex(0);
        compagnon.setText("");
        accreditation.setSelectedIndex(0);
        realisateur.setSelected(true);
        employeur.setText("");
        metier.setText("");
    }

    public void effacertextPlanning() {
        titre.setText("");
        nomSalle.setText("");
        duree.setText("");
        nbPlaces.setText("");
    }

    public void gestionVIPModeModifier() {
        numVIP.setEnabled(true);
        prenom.setEnabled(true);
        nom.setEnabled(true);
        nationalite.setEnabled(true);
        coef.setEnabled(true);
        compagnon.setEnabled(true);
        accreditation.setEnabled(true);
        realisateur.setEnabled(true);
        acteur.setEnabled(true);
        journaliste.setEnabled(true);
        parrain.setEnabled(true);
        autre.setEnabled(true);
        employeur.setEnabled(true);
        metier.setEnabled(true);
        boutonAjouter.setEnabled(false);
        boutonSupprimer.setEnabled(false);
        debut.setEnabled(false);
        precedent.setEnabled(false);
        suivant.setEnabled(false);
        fin.setEnabled(false);
        if (realisateur.isSelected() || acteur.isSelected() || parrain.isSelected()) {
            employeur.setEnabled(false);
            metier.setEnabled(false);
        } else if (journaliste.isSelected()) {
            employeur.setEnabled(true);
            metier.setEnabled(false);
        } else if (autre.isSelected()) {
            employeur.setEnabled(false);
            metier.setEnabled(true);
        }
    }

    public void gestionPlanningModeAffichage() {

        jour.setEnabled(false);
        mois.setEnabled(false);
        annee.setEnabled(false);
        projection.setEnabled(false);
        heure.setEnabled(false);
        numSalle.setEnabled(false);
        titre.setEnabled(false);
        nomSalle.setEnabled(false);
        duree.setEnabled(false);
        nbPlaces.setEnabled(false);
        debut1.setEnabled(true);
        precedent1.setEnabled(true);
        suivant1.setEnabled(true);
        fin1.setEnabled(true);
        boutonAjouter1.setEnabled(true);
        boutonModifier1.setEnabled(true);
        boutonSupprimer1.setEnabled(true);

    }

    public void gestionPlanningModeAjouter() {

        effacertextPlanning();
        jour.setEnabled(true);
        mois.setEnabled(true);
        annee.setEnabled(true);
        projection.setEnabled(true);
        heure.setEnabled(true);
        numSalle.setEnabled(true);
        titre.setEnabled(true);
        nomSalle.setEnabled(true);
        duree.setEnabled(true);
        nbPlaces.setEnabled(true);
        boutonAjouter1.setEnabled(false);
        boutonSupprimer1.setEnabled(false);
        debut1.setEnabled(false);
        precedent1.setEnabled(false);
        suivant1.setEnabled(false);
        fin1.setEnabled(false);
        boutonAjouter1.setEnabled(true);
        boutonModifier1.setEnabled(false);
        boutonSupprimer1.setEnabled(false);
        debut1.setEnabled(false);
        precedent1.setEnabled(false);
        suivant1.setEnabled(false);
        fin1.setEnabled(false);

    }

    public void gestionPlanningModeModifier() {

        jour.setEnabled(true);
        mois.setEnabled(true);
        annee.setEnabled(true);
        projection.setEnabled(true);
        heure.setEnabled(true);
        numSalle.setEnabled(true);
        titre.setEnabled(true);
        nomSalle.setEnabled(true);
        duree.setEnabled(true);
        nbPlaces.setEnabled(true);
        boutonAjouter1.setEnabled(false);
        boutonModifier1.setEnabled(true);
        boutonSupprimer1.setEnabled(false);
        debut1.setEnabled(false);
        precedent1.setEnabled(false);
        suivant1.setEnabled(false);
        fin1.setEnabled(false);

    }
    
    public void affichagePlanning(){
        if (salle.getSelectedIndex() == 0)
        {
            calendrier.setModel(new ModeleTableSalle1());
        }
        if (salle.getSelectedIndex() == 1)
        {
            calendrier.setModel(new ModeleTableSalle2());
        }
        if (salle.getSelectedIndex() == 2)
        {
            calendrier.setModel(new ModeleTableSalle3());
        }
        if (salle.getSelectedIndex() == 3)
        {
            calendrier.setModel(new ModeleTableSalle4());
        }
        if (salle.getSelectedIndex() == 4)
        {
            calendrier.setModel(new ModeleTableSalle5());
        }
        
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        dialogMode = new javax.swing.JDialog();
        jPanel9 = new javax.swing.JPanel();
        jPanel3 = new javax.swing.JPanel();
        boutonGestionPlanning = new javax.swing.JButton();
        boutonConsultationPlanning = new javax.swing.JButton();
        jPanel10 = new javax.swing.JPanel();
        boutonGestionVIP = new javax.swing.JButton();
        dialogGestionVIP = new javax.swing.JDialog();
        jPanel4 = new javax.swing.JPanel();
        jPanel5 = new javax.swing.JPanel();
        numVIP = new javax.swing.JTextField();
        prenom = new javax.swing.JTextField();
        nom = new javax.swing.JTextField();
        nationalite = new javax.swing.JTextField();
        compagnon = new javax.swing.JTextField();
        jLabel4 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        jLabel7 = new javax.swing.JLabel();
        jLabel8 = new javax.swing.JLabel();
        jLabel9 = new javax.swing.JLabel();
        jLabel10 = new javax.swing.JLabel();
        coef = new javax.swing.JComboBox();
        accreditation = new javax.swing.JComboBox();
        jLabel11 = new javax.swing.JLabel();
        jPanel6 = new javax.swing.JPanel();
        realisateur = new javax.swing.JRadioButton();
        acteur = new javax.swing.JRadioButton();
        journaliste = new javax.swing.JRadioButton();
        parrain = new javax.swing.JRadioButton();
        autre = new javax.swing.JRadioButton();
        jPanel7 = new javax.swing.JPanel();
        jLabel12 = new javax.swing.JLabel();
        jLabel13 = new javax.swing.JLabel();
        employeur = new javax.swing.JTextField();
        metier = new javax.swing.JTextField();
        jPanel8 = new javax.swing.JPanel();
        boutonAjouter = new javax.swing.JButton();
        boutonModifier = new javax.swing.JButton();
        boutonSupprimer = new javax.swing.JButton();
        jPanel11 = new javax.swing.JPanel();
        debut = new javax.swing.JButton();
        precedent = new javax.swing.JButton();
        suivant = new javax.swing.JButton();
        fin = new javax.swing.JButton();
        jMenuBar1 = new javax.swing.JMenuBar();
        jMenu1 = new javax.swing.JMenu();
        menu = new javax.swing.JMenuItem();
        jSeparator1 = new javax.swing.JPopupMenu.Separator();
        quitter = new javax.swing.JMenuItem();
        jMenu2 = new javax.swing.JMenu();
        about = new javax.swing.JMenuItem();
        dialogGestionPlanning = new javax.swing.JDialog();
        jPanel12 = new javax.swing.JPanel();
        jPanel18 = new javax.swing.JPanel();
        boutonAjouter1 = new javax.swing.JButton();
        boutonModifier1 = new javax.swing.JButton();
        boutonSupprimer1 = new javax.swing.JButton();
        jPanel13 = new javax.swing.JPanel();
        jLabel14 = new javax.swing.JLabel();
        jLabel15 = new javax.swing.JLabel();
        jLabel16 = new javax.swing.JLabel();
        jour = new javax.swing.JComboBox();
        mois = new javax.swing.JComboBox();
        annee = new javax.swing.JComboBox();
        jPanel14 = new javax.swing.JPanel();
        jLabel17 = new javax.swing.JLabel();
        projection = new javax.swing.JComboBox();
        jLabel18 = new javax.swing.JLabel();
        jLabel19 = new javax.swing.JLabel();
        jLabel20 = new javax.swing.JLabel();
        jLabel21 = new javax.swing.JLabel();
        jLabel22 = new javax.swing.JLabel();
        nomSalle = new javax.swing.JTextField();
        titre = new javax.swing.JTextField();
        duree = new javax.swing.JTextField();
        nbPlaces = new javax.swing.JTextField();
        numSalle = new javax.swing.JComboBox();
        jLabel23 = new javax.swing.JLabel();
        heure = new javax.swing.JComboBox();
        jPanel15 = new javax.swing.JPanel();
        debut1 = new javax.swing.JButton();
        precedent1 = new javax.swing.JButton();
        suivant1 = new javax.swing.JButton();
        fin1 = new javax.swing.JButton();
        jMenuBar2 = new javax.swing.JMenuBar();
        jMenu3 = new javax.swing.JMenu();
        menu1 = new javax.swing.JMenuItem();
        jSeparator2 = new javax.swing.JPopupMenu.Separator();
        quitter1 = new javax.swing.JMenuItem();
        jMenu4 = new javax.swing.JMenu();
        about1 = new javax.swing.JMenuItem();
        dialogAffichagePlanning = new javax.swing.JDialog();
        jPanel16 = new javax.swing.JPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        calendrier = new javax.swing.JTable();
        jPanel17 = new javax.swing.JPanel();
        debut2 = new javax.swing.JButton();
        precedent2 = new javax.swing.JButton();
        suivant2 = new javax.swing.JButton();
        fin2 = new javax.swing.JButton();
        salle = new javax.swing.JComboBox();
        jMenuBar3 = new javax.swing.JMenuBar();
        jMenu5 = new javax.swing.JMenu();
        menu2 = new javax.swing.JMenuItem();
        jSeparator3 = new javax.swing.JPopupMenu.Separator();
        quitter2 = new javax.swing.JMenuItem();
        jMenu6 = new javax.swing.JMenu();
        about2 = new javax.swing.JMenuItem();
        gestionVIPGroup = new javax.swing.ButtonGroup();
        jPanel2 = new javax.swing.JPanel();
        jPanel1 = new javax.swing.JPanel();
        password = new javax.swing.JPasswordField();
        login = new javax.swing.JTextField();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        boutonConnexion = new javax.swing.JButton();
        jLabel1 = new javax.swing.JLabel();

        dialogMode.setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);
        dialogMode.setMinimumSize(new java.awt.Dimension(274, 193));
        dialogMode.setResizable(false);
        dialogMode.addWindowListener(new java.awt.event.WindowAdapter() {
            public void windowClosing(java.awt.event.WindowEvent evt) {
                dialogModeWindowClosing(evt);
            }
        });

        jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder("Planning"));

        boutonGestionPlanning.setText("Gestion");
        boutonGestionPlanning.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                boutonGestionPlanningActionPerformed(evt);
            }
        });

        boutonConsultationPlanning.setText("Consultation");
        boutonConsultationPlanning.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                boutonConsultationPlanningActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(boutonGestionPlanning, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(boutonConsultationPlanning, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(boutonGestionPlanning, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(boutonConsultationPlanning, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE)))
        );

        jPanel10.setBorder(javax.swing.BorderFactory.createTitledBorder("VIP"));

        boutonGestionVIP.setText("Gestion");
        boutonGestionVIP.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                boutonGestionVIPActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel10Layout = new javax.swing.GroupLayout(jPanel10);
        jPanel10.setLayout(jPanel10Layout);
        jPanel10Layout.setHorizontalGroup(
            jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel10Layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(boutonGestionVIP, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(68, 68, 68))
        );
        jPanel10Layout.setVerticalGroup(
            jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel10Layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(boutonGestionVIP, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE))
        );

        javax.swing.GroupLayout jPanel9Layout = new javax.swing.GroupLayout(jPanel9);
        jPanel9.setLayout(jPanel9Layout);
        jPanel9Layout.setHorizontalGroup(
            jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel9Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel10, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );
        jPanel9Layout.setVerticalGroup(
            jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel9Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout dialogModeLayout = new javax.swing.GroupLayout(dialogMode.getContentPane());
        dialogMode.getContentPane().setLayout(dialogModeLayout);
        dialogModeLayout.setHorizontalGroup(
            dialogModeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel9, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        dialogModeLayout.setVerticalGroup(
            dialogModeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
        );

        dialogGestionVIP.setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        dialogGestionVIP.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
            public void propertyChange(java.beans.PropertyChangeEvent evt) {
                dialogGestionVIPPropertyChange(evt);
            }
        });

        jPanel5.setBorder(javax.swing.BorderFactory.createTitledBorder("Informations VIP"));

        numVIP.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
            public void propertyChange(java.beans.PropertyChangeEvent evt) {
                numVIPPropertyChange(evt);
            }
        });

        prenom.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
            public void propertyChange(java.beans.PropertyChangeEvent evt) {
                numVIPPropertyChange(evt);
            }
        });

        nom.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
            public void propertyChange(java.beans.PropertyChangeEvent evt) {
                numVIPPropertyChange(evt);
            }
        });

        nationalite.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
            public void propertyChange(java.beans.PropertyChangeEvent evt) {
                numVIPPropertyChange(evt);
            }
        });

        compagnon.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
            public void propertyChange(java.beans.PropertyChangeEvent evt) {
                numVIPPropertyChange(evt);
            }
        });

        jLabel4.setText("Numéro :");

        jLabel5.setText("Prénom :");

        jLabel6.setText("Nom :");

        jLabel7.setText("Nationalité :");

        jLabel8.setText("Coefficient d'attrait :");

        jLabel9.setText("Compagnon :");

        jLabel10.setText("Accréditation :");

        coef.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10" }));
        coef.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                coefActionPerformed(evt);
            }
        });
        coef.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
            public void propertyChange(java.beans.PropertyChangeEvent evt) {
                numVIPPropertyChange(evt);
            }
        });

        accreditation.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10" }));
        accreditation.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
            public void propertyChange(java.beans.PropertyChangeEvent evt) {
                numVIPPropertyChange(evt);
            }
        });

        javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
        jPanel5.setLayout(jPanel5Layout);
        jPanel5Layout.setHorizontalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel5Layout.createSequentialGroup()
                        .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addGroup(jPanel5Layout.createSequentialGroup()
                                .addComponent(jLabel5)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(prenom, javax.swing.GroupLayout.PREFERRED_SIZE, 73, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(jPanel5Layout.createSequentialGroup()
                                .addComponent(jLabel7)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(nationalite))
                            .addGroup(jPanel5Layout.createSequentialGroup()
                                .addComponent(jLabel6)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(nom, javax.swing.GroupLayout.PREFERRED_SIZE, 89, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addGap(84, 84, 84)
                        .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addGroup(jPanel5Layout.createSequentialGroup()
                                .addComponent(jLabel8)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(coef, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                            .addGroup(jPanel5Layout.createSequentialGroup()
                                .addComponent(jLabel10)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(accreditation, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel5Layout.createSequentialGroup()
                                .addComponent(jLabel9)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(compagnon, javax.swing.GroupLayout.PREFERRED_SIZE, 95, javax.swing.GroupLayout.PREFERRED_SIZE))))
                    .addGroup(jPanel5Layout.createSequentialGroup()
                        .addComponent(jLabel4)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(numVIP, javax.swing.GroupLayout.PREFERRED_SIZE, 73, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jLabel11)
                .addContainerGap())
        );
        jPanel5Layout.setVerticalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addGap(20, 20, 20)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(numVIP, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel4))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(prenom, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel5)
                    .addComponent(jLabel8)
                    .addComponent(coef, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(nom, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel6)
                    .addComponent(jLabel9)
                    .addComponent(compagnon, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel7)
                    .addComponent(nationalite, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel10)
                    .addComponent(accreditation, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(22, Short.MAX_VALUE))
            .addComponent(jLabel11, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 0, Short.MAX_VALUE)
        );

        jPanel6.setBorder(javax.swing.BorderFactory.createTitledBorder("Profession"));

        gestionVIPGroup.add(realisateur);
        realisateur.setSelected(true);
        realisateur.setText("Réalisateur");
        realisateur.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                realisateurActionPerformed(evt);
            }
        });
        realisateur.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
            public void propertyChange(java.beans.PropertyChangeEvent evt) {
                numVIPPropertyChange(evt);
            }
        });

        gestionVIPGroup.add(acteur);
        acteur.setText("Acteur");
        acteur.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                acteurActionPerformed(evt);
            }
        });
        acteur.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
            public void propertyChange(java.beans.PropertyChangeEvent evt) {
                numVIPPropertyChange(evt);
            }
        });

        gestionVIPGroup.add(journaliste);
        journaliste.setText("Journaliste");
        journaliste.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                journalisteActionPerformed(evt);
            }
        });
        journaliste.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
            public void propertyChange(java.beans.PropertyChangeEvent evt) {
                numVIPPropertyChange(evt);
            }
        });

        gestionVIPGroup.add(parrain);
        parrain.setText("Parrain officiel");
        parrain.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                parrainActionPerformed(evt);
            }
        });
        parrain.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
            public void propertyChange(java.beans.PropertyChangeEvent evt) {
                numVIPPropertyChange(evt);
            }
        });

        gestionVIPGroup.add(autre);
        autre.setText("Autre");
        autre.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                autreActionPerformed(evt);
            }
        });
        autre.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
            public void propertyChange(java.beans.PropertyChangeEvent evt) {
                numVIPPropertyChange(evt);
            }
        });

        javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);
        jPanel6.setLayout(jPanel6Layout);
        jPanel6Layout.setHorizontalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(realisateur)
                .addGap(18, 18, 18)
                .addComponent(acteur)
                .addGap(18, 18, 18)
                .addComponent(journaliste)
                .addGap(18, 18, 18)
                .addComponent(parrain)
                .addGap(18, 18, 18)
                .addComponent(autre)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel6Layout.setVerticalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup()
                .addGap(17, 17, 17)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(realisateur)
                    .addComponent(acteur)
                    .addComponent(journaliste)
                    .addComponent(parrain)
                    .addComponent(autre))
                .addContainerGap(22, Short.MAX_VALUE))
        );

        jPanel7.setBorder(javax.swing.BorderFactory.createTitledBorder("Informations complémentaires"));

        jLabel12.setText("Employeur :");

        jLabel13.setText("Métier :");

        employeur.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
            public void propertyChange(java.beans.PropertyChangeEvent evt) {
                numVIPPropertyChange(evt);
            }
        });

        metier.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
            public void propertyChange(java.beans.PropertyChangeEvent evt) {
                numVIPPropertyChange(evt);
            }
        });

        javax.swing.GroupLayout jPanel7Layout = new javax.swing.GroupLayout(jPanel7);
        jPanel7.setLayout(jPanel7Layout);
        jPanel7Layout.setHorizontalGroup(
            jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel7Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel12)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(employeur, javax.swing.GroupLayout.PREFERRED_SIZE, 84, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(67, 67, 67)
                .addComponent(jLabel13)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(metier, javax.swing.GroupLayout.PREFERRED_SIZE, 84, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel7Layout.setVerticalGroup(
            jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel7Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel12)
                    .addComponent(jLabel13)
                    .addComponent(employeur, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(metier, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(14, Short.MAX_VALUE))
        );

        jPanel8.setBorder(javax.swing.BorderFactory.createTitledBorder("Actions"));

        boutonAjouter.setText("Ajouter");
        boutonAjouter.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                boutonAjouterActionPerformed(evt);
            }
        });

        boutonModifier.setText("Modifier");
        boutonModifier.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                boutonModifierActionPerformed(evt);
            }
        });

        boutonSupprimer.setText("Supprimer");
        boutonSupprimer.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                boutonSupprimerActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel8Layout = new javax.swing.GroupLayout(jPanel8);
        jPanel8.setLayout(jPanel8Layout);
        jPanel8Layout.setHorizontalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel8Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(boutonAjouter)
                .addGap(97, 97, 97)
                .addComponent(boutonModifier)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(boutonSupprimer)
                .addContainerGap())
        );
        jPanel8Layout.setVerticalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel8Layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(boutonAjouter)
                    .addComponent(boutonModifier)
                    .addComponent(boutonSupprimer))
                .addContainerGap())
        );

        jPanel11.setBorder(javax.swing.BorderFactory.createTitledBorder("Navigation"));

        debut.setText("Début");
        debut.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                debutActionPerformed(evt);
            }
        });

        precedent.setText("<<");
        precedent.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                precedentActionPerformed(evt);
            }
        });

        suivant.setText(">>");
        suivant.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                suivantActionPerformed(evt);
            }
        });

        fin.setText("Fin");
        fin.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                finActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel11Layout = new javax.swing.GroupLayout(jPanel11);
        jPanel11.setLayout(jPanel11Layout);
        jPanel11Layout.setHorizontalGroup(
            jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel11Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(debut)
                .addGap(85, 85, 85)
                .addComponent(precedent)
                .addGap(48, 48, 48)
                .addComponent(suivant)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(fin)
                .addContainerGap())
        );
        jPanel11Layout.setVerticalGroup(
            jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel11Layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(debut)
                    .addComponent(precedent)
                    .addComponent(suivant)
                    .addComponent(fin)))
        );

        javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
        jPanel4.setLayout(jPanel4Layout);
        jPanel4Layout.setHorizontalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel7, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel6, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel8, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel11, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );
        jPanel4Layout.setVerticalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addGap(7, 7, 7)
                .addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jPanel11, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(134, 134, 134))
        );

        jMenu1.setText("Fichier");

        menu.setText("Revenir au menu...");
        menu.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                menuActionPerformed(evt);
            }
        });
        jMenu1.add(menu);
        jMenu1.add(jSeparator1);

        quitter.setText("Quitter...");
        quitter.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                quitterActionPerformed(evt);
            }
        });
        jMenu1.add(quitter);

        jMenuBar1.add(jMenu1);

        jMenu2.setText("?");

        about.setText("A propos...");
        about.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                aboutActionPerformed(evt);
            }
        });
        jMenu2.add(about);

        jMenuBar1.add(jMenu2);

        dialogGestionVIP.setJMenuBar(jMenuBar1);

        javax.swing.GroupLayout dialogGestionVIPLayout = new javax.swing.GroupLayout(dialogGestionVIP.getContentPane());
        dialogGestionVIP.getContentPane().setLayout(dialogGestionVIPLayout);
        dialogGestionVIPLayout.setHorizontalGroup(
            dialogGestionVIPLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        dialogGestionVIPLayout.setVerticalGroup(
            dialogGestionVIPLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(dialogGestionVIPLayout.createSequentialGroup()
                .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, 488, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(12, Short.MAX_VALUE))
        );

        dialogGestionPlanning.setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);

        jPanel18.setBorder(javax.swing.BorderFactory.createTitledBorder("Actions"));

        boutonAjouter1.setText("Ajouter");
        boutonAjouter1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                boutonAjouter1ActionPerformed(evt);
            }
        });

        boutonModifier1.setText("Modifier");
        boutonModifier1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                boutonModifier1ActionPerformed(evt);
            }
        });

        boutonSupprimer1.setText("Supprimer");

        javax.swing.GroupLayout jPanel18Layout = new javax.swing.GroupLayout(jPanel18);
        jPanel18.setLayout(jPanel18Layout);
        jPanel18Layout.setHorizontalGroup(
            jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel18Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(boutonAjouter1)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(boutonModifier1)
                .addGap(76, 76, 76)
                .addComponent(boutonSupprimer1)
                .addContainerGap())
        );
        jPanel18Layout.setVerticalGroup(
            jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel18Layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(boutonAjouter1)
                    .addComponent(boutonModifier1)
                    .addComponent(boutonSupprimer1))
                .addContainerGap())
        );

        jPanel13.setBorder(javax.swing.BorderFactory.createTitledBorder("Date"));

        jLabel14.setText("Jour :");

        jLabel15.setText("Mois :");

        jLabel16.setText("Année :");

        jour.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));

        mois.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
        mois.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                moisActionPerformed(evt);
            }
        });

        annee.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));

        javax.swing.GroupLayout jPanel13Layout = new javax.swing.GroupLayout(jPanel13);
        jPanel13.setLayout(jPanel13Layout);
        jPanel13Layout.setHorizontalGroup(
            jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel13Layout.createSequentialGroup()
                .addComponent(jLabel14)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jour, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jLabel15)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(mois, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jLabel16)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(annee, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
        );
        jPanel13Layout.setVerticalGroup(
            jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                .addComponent(jLabel14)
                .addComponent(jour, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(jLabel15)
                .addComponent(mois, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(jLabel16)
                .addComponent(annee, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
        );

        jPanel14.setBorder(javax.swing.BorderFactory.createTitledBorder("Informations"));

        jLabel17.setText("Projection :");

        projection.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
        projection.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                projectionActionPerformed(evt);
            }
        });

        jLabel18.setText("Numero de salle :");

        jLabel19.setText("Nom de la salle :");

        jLabel20.setText("Titre du film :");

        jLabel21.setText("Durée du film :");

        jLabel22.setText("Nombre de places :");

        nomSalle.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
            public void propertyChange(java.beans.PropertyChangeEvent evt) {
                titrePropertyChange(evt);
            }
        });

        titre.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
            public void propertyChange(java.beans.PropertyChangeEvent evt) {
                titrePropertyChange(evt);
            }
        });

        duree.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
            public void propertyChange(java.beans.PropertyChangeEvent evt) {
                titrePropertyChange(evt);
            }
        });

        nbPlaces.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
            public void propertyChange(java.beans.PropertyChangeEvent evt) {
                titrePropertyChange(evt);
            }
        });

        numSalle.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));

        jLabel23.setText("Heure de début :");

        heure.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));

        javax.swing.GroupLayout jPanel14Layout = new javax.swing.GroupLayout(jPanel14);
        jPanel14.setLayout(jPanel14Layout);
        jPanel14Layout.setHorizontalGroup(
            jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel14Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(jPanel14Layout.createSequentialGroup()
                        .addComponent(jLabel17)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(projection, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addGroup(jPanel14Layout.createSequentialGroup()
                        .addComponent(jLabel18)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(numSalle, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addGroup(jPanel14Layout.createSequentialGroup()
                        .addComponent(jLabel19)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(nomSalle, javax.swing.GroupLayout.PREFERRED_SIZE, 71, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGap(29, 29, 29)
                .addGroup(jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel14Layout.createSequentialGroup()
                        .addGroup(jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel14Layout.createSequentialGroup()
                                .addComponent(jLabel22)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(nbPlaces, javax.swing.GroupLayout.PREFERRED_SIZE, 58, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(jPanel14Layout.createSequentialGroup()
                                .addComponent(jLabel21)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(duree, javax.swing.GroupLayout.PREFERRED_SIZE, 81, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addContainerGap(62, Short.MAX_VALUE))
                    .addGroup(jPanel14Layout.createSequentialGroup()
                        .addGroup(jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addGroup(jPanel14Layout.createSequentialGroup()
                                .addComponent(jLabel23)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(heure, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel14Layout.createSequentialGroup()
                                .addComponent(jLabel20)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(titre, javax.swing.GroupLayout.PREFERRED_SIZE, 88, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addGap(0, 0, Short.MAX_VALUE))))
        );
        jPanel14Layout.setVerticalGroup(
            jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel14Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel14Layout.createSequentialGroup()
                        .addGroup(jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel23)
                            .addComponent(heure, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(jLabel18)
                                .addComponent(numSalle, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(jLabel20)
                                .addComponent(titre, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(nomSalle, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jLabel19))
                            .addGroup(jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(jLabel21)
                                .addComponent(duree, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel22)
                            .addComponent(nbPlaces, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jLabel17)
                        .addComponent(projection, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jPanel15.setBorder(javax.swing.BorderFactory.createTitledBorder("Navigation"));

        debut1.setText("Début");

        precedent1.setText("<<");

        suivant1.setText(">>");

        fin1.setText("Fin");

        javax.swing.GroupLayout jPanel15Layout = new javax.swing.GroupLayout(jPanel15);
        jPanel15.setLayout(jPanel15Layout);
        jPanel15Layout.setHorizontalGroup(
            jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel15Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(debut1)
                .addGap(49, 49, 49)
                .addComponent(precedent1)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(suivant1)
                .addGap(61, 61, 61)
                .addComponent(fin1)
                .addContainerGap())
        );
        jPanel15Layout.setVerticalGroup(
            jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel15Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(debut1)
                    .addComponent(precedent1)
                    .addComponent(suivant1)
                    .addComponent(fin1))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout jPanel12Layout = new javax.swing.GroupLayout(jPanel12);
        jPanel12.setLayout(jPanel12Layout);
        jPanel12Layout.setHorizontalGroup(
            jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel12Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel13, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel15, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel18, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel14, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );
        jPanel12Layout.setVerticalGroup(
            jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel12Layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jPanel13, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel14, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel18, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel15, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
        );

        jMenu3.setText("Fichier");

        menu1.setText("Revenir au menu...");
        menu1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                menu1ActionPerformed(evt);
            }
        });
        jMenu3.add(menu1);
        jMenu3.add(jSeparator2);

        quitter1.setText("Quitter...");
        quitter1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                quitter1ActionPerformed(evt);
            }
        });
        jMenu3.add(quitter1);

        jMenuBar2.add(jMenu3);

        jMenu4.setText("?");

        about1.setText("A propos...");
        jMenu4.add(about1);

        jMenuBar2.add(jMenu4);

        dialogGestionPlanning.setJMenuBar(jMenuBar2);

        javax.swing.GroupLayout dialogGestionPlanningLayout = new javax.swing.GroupLayout(dialogGestionPlanning.getContentPane());
        dialogGestionPlanning.getContentPane().setLayout(dialogGestionPlanningLayout);
        dialogGestionPlanningLayout.setHorizontalGroup(
            dialogGestionPlanningLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel12, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        dialogGestionPlanningLayout.setVerticalGroup(
            dialogGestionPlanningLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel12, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
        );

        dialogAffichagePlanning.setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);

        calendrier.setEnabled(false);
        calendrier.getTableHeader().setReorderingAllowed(false);
        jScrollPane1.setViewportView(calendrier);

        jPanel17.setBorder(javax.swing.BorderFactory.createTitledBorder("Navigation"));

        debut2.setText("Début");

        precedent2.setText("<<");

        suivant2.setText(">>");

        fin2.setText("Fin");

        javax.swing.GroupLayout jPanel17Layout = new javax.swing.GroupLayout(jPanel17);
        jPanel17.setLayout(jPanel17Layout);
        jPanel17Layout.setHorizontalGroup(
            jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel17Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(debut2)
                .addGap(114, 114, 114)
                .addComponent(precedent2)
                .addGap(103, 103, 103)
                .addComponent(suivant2)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(fin2)
                .addContainerGap())
        );
        jPanel17Layout.setVerticalGroup(
            jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel17Layout.createSequentialGroup()
                .addContainerGap(14, Short.MAX_VALUE)
                .addGroup(jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(debut2)
                    .addComponent(precedent2)
                    .addComponent(suivant2)
                    .addComponent(fin2))
                .addContainerGap())
        );

        salle.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Salle1", "Salle2", "Salle3", "Salle4", "Salle5" }));
        salle.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                salleItemStateChanged(evt);
            }
        });
        salle.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                salleActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel16Layout = new javax.swing.GroupLayout(jPanel16);
        jPanel16.setLayout(jPanel16Layout);
        jPanel16Layout.setHorizontalGroup(
            jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel17, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addComponent(jScrollPane1)
            .addGroup(jPanel16Layout.createSequentialGroup()
                .addGap(260, 260, 260)
                .addComponent(salle, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(272, Short.MAX_VALUE))
        );
        jPanel16Layout.setVerticalGroup(
            jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel16Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(salle, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(21, 21, 21)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 135, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel17, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(0, 14, Short.MAX_VALUE))
        );

        jMenu5.setText("Fichier");

        menu2.setText("Revenir au menu...");
        menu2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                menu2ActionPerformed(evt);
            }
        });
        jMenu5.add(menu2);
        jMenu5.add(jSeparator3);

        quitter2.setText("Quitter...");
        quitter2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                quitter2ActionPerformed(evt);
            }
        });
        jMenu5.add(quitter2);

        jMenuBar3.add(jMenu5);

        jMenu6.setText("?");

        about2.setText("A propos...");
        jMenu6.add(about2);

        jMenuBar3.add(jMenu6);

        dialogAffichagePlanning.setJMenuBar(jMenuBar3);

        javax.swing.GroupLayout dialogAffichagePlanningLayout = new javax.swing.GroupLayout(dialogAffichagePlanning.getContentPane());
        dialogAffichagePlanning.getContentPane().setLayout(dialogAffichagePlanningLayout);
        dialogAffichagePlanningLayout.setHorizontalGroup(
            dialogAffichagePlanningLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel16, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        dialogAffichagePlanningLayout.setVerticalGroup(
            dialogAffichagePlanningLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel16, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setResizable(false);
        addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                formKeyPressed(evt);
            }
        });

        jPanel2.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                jPanel2KeyTyped(evt);
            }
        });

        jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("Connexion"));

        password.setHorizontalAlignment(javax.swing.JTextField.LEFT);
        password.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                passwordKeyTyped(evt);
            }
        });

        login.setHorizontalAlignment(javax.swing.JTextField.LEFT);
        login.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                loginActionPerformed(evt);
            }
        });

        jLabel2.setText("Login :");

        jLabel3.setText("Password :");

        boutonConnexion.setText("Se connecter");
        boutonConnexion.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                boutonConnexionActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGap(94, 94, 94)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(boutonConnexion)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel3)
                            .addComponent(jLabel2))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(login, javax.swing.GroupLayout.PREFERRED_SIZE, 86, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(password, javax.swing.GroupLayout.PREFERRED_SIZE, 86, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(login, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel2))
                .addGap(18, 18, 18)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel3)
                    .addComponent(password, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(boutonConnexion)
                .addContainerGap(33, Short.MAX_VALUE))
        );

        jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/vue/evt_Cannes_logo.jpg"))); // NOI18N
        jLabel1.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addGap(0, 0, Short.MAX_VALUE)
                        .addComponent(jLabel1))
                    .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
                .addContainerGap(33, Short.MAX_VALUE)
                .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 187, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void loginActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_loginActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_loginActionPerformed

    private void boutonConnexionActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_boutonConnexionActionPerformed

        String champLogin = login.getText();
        String pass = String.valueOf(password.getPassword());

        daoCanne.login(champLogin, pass);
        droit = daoCanne.getDroit();


        if (droit == 0) {
            JOptionPane.showMessageDialog(this, "Erreur de connection Log introuvable");
        } else if (droit == 1) {
            this.dispose();
            dialogMode.setVisible(true);
            dialogMode.setLocationRelativeTo(null);
            dialogMode.pack();
        } else if (droit == 2) {
            System.out.println("Le droit est : " + this.droit + "\n");
            this.dispose();
            System.out.println("Le droit est : " + this.droit + "\n");
            dialogMode.setVisible(true);
            dialogMode.setLocationRelativeTo(null);
            dialogMode.pack();
            dialogModeDroitLecture();
        }



    }//GEN-LAST:event_boutonConnexionActionPerformed

    private void coefActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_coefActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_coefActionPerformed

    private void realisateurActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_realisateurActionPerformed
        metier.setEnabled(false);
        employeur.setEnabled(false);
    }//GEN-LAST:event_realisateurActionPerformed

    private void acteurActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_acteurActionPerformed
        metier.setEnabled(false);
        employeur.setEnabled(false);
    }//GEN-LAST:event_acteurActionPerformed

    private void boutonModifierActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_boutonModifierActionPerformed
        if (boutonModifier.getText() == "OK?") {
            VIP vip = null;
            if (prenom.getText().compareTo("") == 0 || nom.getText().compareTo("") == 0 || nationalite.getText().compareTo("") == 0 || compagnon.getText().compareTo("") == 0) {
                JOptionPane.showMessageDialog(this, "Remplir tout les champs");
            } else {
                if (realisateur.isSelected()) {
                    vip = new Realisateur(Integer.parseInt(numVIP.getText()), nom.getText(), prenom.getText(), nationalite.getText(), coef.getSelectedIndex() + 1, compagnon.getText(), accreditation.getSelectedIndex() + 1);
                }

                if (acteur.isSelected()) {
                    vip = new Acteur(Integer.parseInt(numVIP.getText()), nom.getText(), prenom.getText(), nationalite.getText(), coef.getSelectedIndex() + 1, compagnon.getText(), accreditation.getSelectedIndex() + 1);
                }

                if (journaliste.isSelected()) {
                    if (employeur.getText().compareTo("") == 0) {
                        JOptionPane.showMessageDialog(this, "Remplir tout les champs");
                    } else {
                        vip = new Journaliste(Integer.parseInt(numVIP.getText()), nom.getText(), prenom.getText(), nationalite.getText(), coef.getSelectedIndex() + 1, compagnon.getText(), accreditation.getSelectedIndex() + 1, employeur.getText());
                    }
                }
                if (parrain.isSelected()) {
                    vip = new ParrainOfficiel(Integer.parseInt(numVIP.getText()), nom.getText(), prenom.getText(), nationalite.getText(), coef.getSelectedIndex() + 1, compagnon.getText(), accreditation.getSelectedIndex() + 1);
                }

                if (autre.isSelected()) {
                    if (metier.getText().compareTo("") == 0) {
                        JOptionPane.showMessageDialog(this, "Remplir tout les champs");
                    } else {
                        vip = new Autres(Integer.parseInt(numVIP.getText()), nom.getText(), prenom.getText(), nationalite.getText(), coef.getSelectedIndex() + 1, compagnon.getText(), accreditation.getSelectedIndex() + 1, metier.getText());
                    }
                }
                if (vip != null) {
                    daoCanne.suprVIP(donneesVIP.get(key));
                    donneesVIP.remove(key);
                    donneesVIP.add(vip);
                    Collections.sort(donneesVIP);
                    daoCanne.ajouterDB(vip);
                    boutonModifier.setText("Modifier");
                    gestionVIPModeAffichage();
                }

            }
        } else {
            boutonModifier.setText("OK?");
            gestionVIPModeModifier();
        }
    }//GEN-LAST:event_boutonModifierActionPerformed

    private void moisActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_moisActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_moisActionPerformed

    private void projectionActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_projectionActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_projectionActionPerformed

    private void boutonGestionVIPActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_boutonGestionVIPActionPerformed
        System.out.println("Le droit est : " + this.droit + "\n");
        dialogMode.dispose();
        dialogGestionVIP.setVisible(true);
        dialogGestionVIP.pack();
        dialogGestionVIP.setLocationRelativeTo(null);
        initDonneesVIP();
        gestionVIPModeAffichage();

    }//GEN-LAST:event_boutonGestionVIPActionPerformed

    private void boutonGestionPlanningActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_boutonGestionPlanningActionPerformed
        System.out.println("Le droit est : " + this.droit + "\n");
        dialogMode.dispose();
        dialogGestionPlanning.setVisible(true);
        dialogGestionPlanning.pack();
        dialogGestionPlanning.setLocationRelativeTo(null);
        gestionPlanningModeAffichage();
    }//GEN-LAST:event_boutonGestionPlanningActionPerformed

    private void boutonConsultationPlanningActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_boutonConsultationPlanningActionPerformed
        System.out.println("Le droit est : " + this.droit + "\n");
        dialogMode.dispose();
        dialogAffichagePlanning.setVisible(true);
        dialogAffichagePlanning.pack();
        dialogAffichagePlanning.setLocationRelativeTo(null);
        affichagePlanning();

    }//GEN-LAST:event_boutonConsultationPlanningActionPerformed

    private void menuActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_menuActionPerformed
        dialogGestionVIP.dispose();
        dialogMode.setVisible(true);
    }//GEN-LAST:event_menuActionPerformed

    private void menu2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_menu2ActionPerformed
        dialogAffichagePlanning.dispose();
        dialogMode.setVisible(true);

    }//GEN-LAST:event_menu2ActionPerformed

    private void aboutActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_aboutActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_aboutActionPerformed

    private void dialogModeWindowClosing(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_dialogModeWindowClosing
        System.exit(0);
    }//GEN-LAST:event_dialogModeWindowClosing

    private void quitterActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_quitterActionPerformed
        System.exit(0);
    }//GEN-LAST:event_quitterActionPerformed

    private void quitter2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_quitter2ActionPerformed
        System.exit(0);
    }//GEN-LAST:event_quitter2ActionPerformed

    private void formKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_formKeyPressed
        // TODO add your handling code here:
    }//GEN-LAST:event_formKeyPressed

    private void jPanel2KeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jPanel2KeyTyped
        // TODO add your handling code here:
    }//GEN-LAST:event_jPanel2KeyTyped

    private void passwordKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_passwordKeyTyped
        if (evt.getKeyChar() == '\n') {
            String champLogin = login.getText();
            String pass = String.valueOf(password.getPassword());

            DAOCanneOracle daoCanne = new DAOCanneOracle(conn);
            daoCanne.login(champLogin, pass);

            droit = daoCanne.getDroit();


            if (droit == 0) {
                JOptionPane.showMessageDialog(this, "Erreur de connection Log introuvable");
            } else if (droit == 1) {
                this.dispose();
                dialogMode.setVisible(true);
                dialogMode.setLocationRelativeTo(null);
                dialogMode.pack();
            } else if (droit == 2) {
                System.out.println("Le droit est : " + this.droit + "\n");
                this.dispose();
                System.out.println("Le droit est : " + this.droit + "\n");
                dialogMode.setVisible(true);
                dialogMode.setLocationRelativeTo(null);
                dialogMode.pack();
                dialogModeDroitLecture();
            }
        }
    }//GEN-LAST:event_passwordKeyTyped

    private void dialogGestionVIPPropertyChange(java.beans.PropertyChangeEvent evt) {//GEN-FIRST:event_dialogGestionVIPPropertyChange
    }//GEN-LAST:event_dialogGestionVIPPropertyChange

    private void numVIPPropertyChange(java.beans.PropertyChangeEvent evt) {//GEN-FIRST:event_numVIPPropertyChange
        Color couleur1 = new Color(255, 255, 203);
        if (!numVIP.isEnabled()) {
            numVIP.setBackground(couleur1);
        } else {
            numVIP.setBackground(Color.WHITE);
        }
        if (!prenom.isEnabled()) {
            prenom.setBackground(couleur1);
        } else {
            prenom.setBackground(Color.WHITE);
        }
        if (!nom.isEnabled()) {
            nom.setBackground(couleur1);
        } else {
            nom.setBackground(Color.WHITE);
        }
        if (!nationalite.isEnabled()) {
            nationalite.setBackground(couleur1);
        } else {
            nationalite.setBackground(Color.WHITE);
        }
        if (!coef.isEnabled()) {
            coef.setBackground(couleur1);
        } else {
            coef.setBackground(Color.WHITE);
        }
        if (!compagnon.isEnabled()) {
            compagnon.setBackground(couleur1);
        } else {
            compagnon.setBackground(Color.WHITE);
        }
        if (!accreditation.isEnabled()) {
            accreditation.setBackground(couleur1);
        } else {
            accreditation.setBackground(Color.WHITE);
        }
        if (!employeur.isEnabled()) {
            employeur.setBackground(couleur1);
        } else {
            employeur.setBackground(Color.WHITE);
        }
        if (!metier.isEnabled()) {
            metier.setBackground(couleur1);
        } else {
            metier.setBackground(Color.WHITE);
        }
    }//GEN-LAST:event_numVIPPropertyChange

    private void boutonAjouterActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_boutonAjouterActionPerformed
        VIP vip = null;
        if (boutonAjouter.getText().compareTo("OK?") == 0) {
            if (prenom.getText().compareTo("") == 0 || nom.getText().compareTo("") == 0 || nationalite.getText().compareTo("") == 0 || compagnon.getText().compareTo("") == 0) {
                JOptionPane.showMessageDialog(this, "Remplir tout les champs");
            } else {
                if (realisateur.isSelected()) {
                    vip = new Realisateur(nom.getText(), prenom.getText(), nationalite.getText(), coef.getSelectedIndex() + 1, compagnon.getText(), accreditation.getSelectedIndex() + 1);
                }

                if (acteur.isSelected()) {
                    vip = new Acteur(nom.getText(), prenom.getText(), nationalite.getText(), coef.getSelectedIndex() + 1, compagnon.getText(), accreditation.getSelectedIndex() + 1);
                }

                if (journaliste.isSelected()) {
                    if (employeur.getText().compareTo("") == 0) {
                        JOptionPane.showMessageDialog(this, "Remplir tout les champs");
                    } else {
                        vip = new Journaliste(nom.getText(), prenom.getText(), nationalite.getText(), coef.getSelectedIndex() + 1, compagnon.getText(), accreditation.getSelectedIndex() + 1, employeur.getText());
                    }
                }
                if (parrain.isSelected()) {
                    vip = new ParrainOfficiel(nom.getText(), prenom.getText(), nationalite.getText(), coef.getSelectedIndex() + 1, compagnon.getText(), accreditation.getSelectedIndex() + 1);
                }

                if (autre.isSelected()) {
                    if (metier.getText().compareTo("") == 0) {
                        JOptionPane.showMessageDialog(this, "Remplir tout les champs");
                    } else {
                        vip = new Autres(nom.getText(), prenom.getText(), nationalite.getText(), coef.getSelectedIndex() + 1, compagnon.getText(), accreditation.getSelectedIndex() + 1, metier.getText());
                    }
                }

            }
            if (vip != null) {
                key = donneesVIP.size();
                donneesVIP.add(vip);
                daoCanne.ajouterDB(vip);
                boutonAjouter.setText("Ajouter");
                gestionVIPModeAffichage();
            }
            
        } else {
            boutonAjouter.setText("OK?");
            gestionVIPModeAjouter();
        }
    }//GEN-LAST:event_boutonAjouterActionPerformed

    private void titrePropertyChange(java.beans.PropertyChangeEvent evt) {//GEN-FIRST:event_titrePropertyChange
        Color couleur1 = new Color(255, 255, 203);

        if (!titre.isEnabled()) {
            titre.setBackground(couleur1);
        } else {
            titre.setBackground(Color.WHITE);
        }
        if (!nomSalle.isEnabled()) {
            nomSalle.setBackground(couleur1);
        } else {
            nomSalle.setBackground(Color.WHITE);
        }
        if (!duree.isEnabled()) {
            duree.setBackground(couleur1);
        } else {
            duree.setBackground(Color.WHITE);
        }
        if (!nbPlaces.isEnabled()) {
            nbPlaces.setBackground(couleur1);
        } else {
            nbPlaces.setBackground(Color.WHITE);
        }
    }//GEN-LAST:event_titrePropertyChange

    private void boutonAjouter1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_boutonAjouter1ActionPerformed

        if (boutonAjouter1.getText() == "OK?") {
            System.out.println("Ajout au conteneur");
            boutonAjouter1.setText("Ajouter");
            gestionPlanningModeAffichage();
        } else {
            boutonAjouter1.setText("OK?");
            gestionPlanningModeAjouter();
        }
    }//GEN-LAST:event_boutonAjouter1ActionPerformed

    private void boutonModifier1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_boutonModifier1ActionPerformed
        if (boutonModifier1.getText() == "OK?") {
            System.out.println("Modification dans le conteneur");
            boutonModifier1.setText("Modifier");
            gestionPlanningModeAffichage();
        } else {
            boutonModifier1.setText("OK?");
            gestionPlanningModeModifier();
        }
    }//GEN-LAST:event_boutonModifier1ActionPerformed

    private void journalisteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_journalisteActionPerformed
        employeur.setEnabled(true);
        metier.setEnabled(false);
    }//GEN-LAST:event_journalisteActionPerformed

    private void autreActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_autreActionPerformed
        employeur.setEnabled(false);
        metier.setEnabled(true);
    }//GEN-LAST:event_autreActionPerformed

    private void parrainActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_parrainActionPerformed
        metier.setEnabled(false);
        employeur.setEnabled(false);
    }//GEN-LAST:event_parrainActionPerformed

    private void debutActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_debutActionPerformed
        key = 0;
        gestionVIPModeAffichage();
    }//GEN-LAST:event_debutActionPerformed

    private void precedentActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_precedentActionPerformed
        if (key >= 1) {
            key--;
            gestionVIPModeAffichage();
        }
    }//GEN-LAST:event_precedentActionPerformed

    private void suivantActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_suivantActionPerformed
        if (key < donneesVIP.size() - 1) {
            key++;
            gestionVIPModeAffichage();
        }

    }//GEN-LAST:event_suivantActionPerformed

    private void finActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_finActionPerformed
        key = donneesVIP.size() - 1;
        gestionVIPModeAffichage();
    }//GEN-LAST:event_finActionPerformed

    private void boutonSupprimerActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_boutonSupprimerActionPerformed
        daoCanne.suprVIP(donneesVIP.get(key));
        if (key == (donneesVIP.size() - 1)) {
            key--;
            donneesVIP.remove(key + 1);
            gestionVIPModeAffichage();
        } else {
            donneesVIP.remove(key);
            gestionVIPModeAffichage();
        }
    }//GEN-LAST:event_boutonSupprimerActionPerformed

    private void quitter1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_quitter1ActionPerformed
        System.exit(0);
    }//GEN-LAST:event_quitter1ActionPerformed

    private void menu1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_menu1ActionPerformed
        dialogGestionPlanning.dispose();
        dialogMode.setVisible(true);
    }//GEN-LAST:event_menu1ActionPerformed

    private void salleItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_salleItemStateChanged
        affichagePlanning();
    }//GEN-LAST:event_salleItemStateChanged

    private void salleActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_salleActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_salleActionPerformed

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JMenuItem about;
    private javax.swing.JMenuItem about1;
    private javax.swing.JMenuItem about2;
    private javax.swing.JComboBox accreditation;
    private javax.swing.JRadioButton acteur;
    private javax.swing.JComboBox annee;
    private javax.swing.JRadioButton autre;
    private javax.swing.JButton boutonAjouter;
    private javax.swing.JButton boutonAjouter1;
    private javax.swing.JButton boutonConnexion;
    private javax.swing.JButton boutonConsultationPlanning;
    private javax.swing.JButton boutonGestionPlanning;
    private javax.swing.JButton boutonGestionVIP;
    private javax.swing.JButton boutonModifier;
    private javax.swing.JButton boutonModifier1;
    private javax.swing.JButton boutonSupprimer;
    private javax.swing.JButton boutonSupprimer1;
    private javax.swing.JTable calendrier;
    private javax.swing.JComboBox coef;
    private javax.swing.JTextField compagnon;
    private javax.swing.JButton debut;
    private javax.swing.JButton debut1;
    private javax.swing.JButton debut2;
    private javax.swing.JDialog dialogAffichagePlanning;
    private javax.swing.JDialog dialogGestionPlanning;
    private javax.swing.JDialog dialogGestionVIP;
    private javax.swing.JDialog dialogMode;
    private javax.swing.JTextField duree;
    private javax.swing.JTextField employeur;
    private javax.swing.JButton fin;
    private javax.swing.JButton fin1;
    private javax.swing.JButton fin2;
    private javax.swing.ButtonGroup gestionVIPGroup;
    private javax.swing.JComboBox heure;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel17;
    private javax.swing.JLabel jLabel18;
    private javax.swing.JLabel jLabel19;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel20;
    private javax.swing.JLabel jLabel21;
    private javax.swing.JLabel jLabel22;
    private javax.swing.JLabel jLabel23;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JMenu jMenu1;
    private javax.swing.JMenu jMenu2;
    private javax.swing.JMenu jMenu3;
    private javax.swing.JMenu jMenu4;
    private javax.swing.JMenu jMenu5;
    private javax.swing.JMenu jMenu6;
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JMenuBar jMenuBar2;
    private javax.swing.JMenuBar jMenuBar3;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel10;
    private javax.swing.JPanel jPanel11;
    private javax.swing.JPanel jPanel12;
    private javax.swing.JPanel jPanel13;
    private javax.swing.JPanel jPanel14;
    private javax.swing.JPanel jPanel15;
    private javax.swing.JPanel jPanel16;
    private javax.swing.JPanel jPanel17;
    private javax.swing.JPanel jPanel18;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JPanel jPanel6;
    private javax.swing.JPanel jPanel7;
    private javax.swing.JPanel jPanel8;
    private javax.swing.JPanel jPanel9;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JPopupMenu.Separator jSeparator1;
    private javax.swing.JPopupMenu.Separator jSeparator2;
    private javax.swing.JPopupMenu.Separator jSeparator3;
    private javax.swing.JComboBox jour;
    private javax.swing.JRadioButton journaliste;
    private javax.swing.JTextField login;
    private javax.swing.JMenuItem menu;
    private javax.swing.JMenuItem menu1;
    private javax.swing.JMenuItem menu2;
    private javax.swing.JTextField metier;
    private javax.swing.JComboBox mois;
    private javax.swing.JTextField nationalite;
    private javax.swing.JTextField nbPlaces;
    private javax.swing.JTextField nom;
    private javax.swing.JTextField nomSalle;
    private javax.swing.JComboBox numSalle;
    private javax.swing.JTextField numVIP;
    private javax.swing.JRadioButton parrain;
    private javax.swing.JPasswordField password;
    private javax.swing.JButton precedent;
    private javax.swing.JButton precedent1;
    private javax.swing.JButton precedent2;
    private javax.swing.JTextField prenom;
    private javax.swing.JComboBox projection;
    private javax.swing.JMenuItem quitter;
    private javax.swing.JMenuItem quitter1;
    private javax.swing.JMenuItem quitter2;
    private javax.swing.JRadioButton realisateur;
    private javax.swing.JComboBox salle;
    private javax.swing.JButton suivant;
    private javax.swing.JButton suivant1;
    private javax.swing.JButton suivant2;
    private javax.swing.JTextField titre;
    // End of variables declaration//GEN-END:variables
}
